<%-- 
    Document   : login
    Created on : Oct 18, 2009, 8:21:10 PM
    Author     : moustafa
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
    </head>
    <body>
        <%HttpSession s = request.getSession(false);
        String error = "";
        if(s != null){
            error =  (String)s.getAttribute("error");
            if(error == null)
                error = "";
        }
        %>
        <p style="color:red"><%=error%></p>
        <form action="login" method="POST" onsubmit="<%s.setAttribute("error", "");%>">
            Username: <input type="text" name="username" value="" /><br>
            Password: <input type="password" name="password" value="" /><br>
            <input type="submit" value="Login" />
        </form>
    </body>
</html>
